home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 08 - 1992 / 08.03 Jul 92 / Matrix Parser / Globals < prev    next >
Encoding:
Text File  |  1992-12-24  |  3.6 KB  |  138 lines  |  [TEXT/PJMM]

  1. unit Globals;
  2.  
  3. interface
  4.  
  5.     procedure Globals;
  6.  
  7.     const
  8.  
  9.         blank = ' ';
  10.         comma = ',';
  11.         asterisk = '*';
  12.         crosshatch = '#';
  13.         rightslash = '/';
  14.         leftslash = '\';
  15.         plus = '+';
  16.         minus = '-';
  17.         equals = '=';
  18.         rightparen = ')';
  19.         semicolon = ';';
  20.         leftparen = '(';
  21.         exponent = '^';
  22.         quote = '''';
  23.         imod = 'mod';
  24.         idiv = 'div';
  25.         ampersand = '@';
  26.         pivalue = 3.141592653589793238462643;
  27.         numconstants = 2;
  28.         maxnumberofstrings = 200;
  29.         maxnumberofnodes = 200;
  30.         maxstringsize = 20;
  31.         maxnumberfiles = 200;
  32.         maxnumbermatrices = 200;
  33.         maxnumberlongints = 200;
  34.         maxelements = 2000000;
  35.  
  36.     type
  37.  
  38.         stringsize = string[maxstringsize];
  39.         ptrstringsize = ^stringsize;
  40.         hdlstringsize = ^ptrstringsize;
  41.  
  42.         string30 = string[30];
  43.         array2 = array[1..2] of stringsize;
  44.  
  45.         extendedfile = file of extended;
  46.         ptrextendedfile = ^extendedfile;
  47.         hdlextendedfile = ^ptrextendedfile;
  48.  
  49.         extendedfilearrayhdls = array[1..maxnumbermatrices] of hdlextendedfile;
  50.         ptrextendedfilearrayhdls = ^extendedfilearrayhdls;
  51.         hdlextendedfilearrayhdls = ^ptrextendedfilearrayhdls;
  52.  
  53.         booleanfilearray = array[1..maxnumberfiles] of boolean;
  54.         ptrbooleanfilearray = ^booleanfilearray;
  55.         hdlbooleanfilearray = ^ptrbooleanfilearray;
  56.  
  57.         stringarray0 = array[0..maxnumberofstrings] of hdlstringsize;
  58.         ptrstringarray0 = ^stringarray0;
  59.         hdlstringarray0 = ^ptrstringarray0;
  60.  
  61.         intarray0 = array[0..maxnumberofstrings] of longint;
  62.         ptrintarray0 = ^intarray0;
  63.         hdlintarray0 = ^ptrintarray0;
  64.  
  65.         ptrextended = ^extended;
  66.         hdlextended = ^ptrextended;
  67.  
  68.         extendarray = array[1..maxnumberofstrings] of hdlextended;
  69.         ptrextendarray = ^extendarray;
  70.         hdlextendarray = ^ptrextendarray;
  71.  
  72.         flagtype = array[1..maxnumberofstrings] of boolean;
  73.         ptrflagtype = ^flagtype;
  74.         hdlflagtype = ^ptrflagtype;
  75.  
  76.         token = record
  77.                 index: string30;
  78.             end;
  79.  
  80.         noderecord = record
  81.                 optype: stringsize;                            {type of operation}
  82.                 loptype: stringsize;                           {left operand type}
  83.                 roptype: stringsize;                          {right operand type}
  84.                 op: token;                                          {operator/function symbol}
  85.                 lop: token;                                         {name/value of left operand}
  86.                 rop: token;                                        {name/value of right operand}
  87.             end;
  88.  
  89.         ptrnoderecord = ^noderecord;
  90.         hdlnoderecord = ^ptrnoderecord;
  91.  
  92.         arrayhdlnoderecord = array[1..maxnumberofnodes] of hdlnoderecord;
  93.         ptrarrayhdlnoderecord = ^arrayhdlnoderecord;
  94.         hdlarrayhdlnoderecord = ^ptrarrayhdlnoderecord;
  95.  
  96.         singlearraymatrix = array[1..maxelements] of extended;
  97.         ptrsinglearraymatrix = ^singlearraymatrix;
  98.         hdlsinglearraymatrix = ^ptrsinglearraymatrix;
  99.  
  100.         nodematrixarray = array[1..maxnumberofnodes] of hdlsinglearraymatrix;
  101.         ptrnodematrixarray = ^nodematrixarray;
  102.         hdlnodematrixarray = ^ptrnodematrixarray;
  103.  
  104.         storematrixarray = array[1..maxnumbermatrices] of hdlsinglearraymatrix;
  105.         ptrstorematrixarray = ^storematrixarray;
  106.         hdlstorematrixarray = ^ptrstorematrixarray;
  107.  
  108.     var
  109.  
  110.         bignumber: longint;
  111.  
  112.         numvariables, numnodes, numberfiles, decplace, decplaceplus10: longint;
  113.         strvar: hdlstringarray0;  {name & type of stored variable}
  114.  
  115.         matfile: hdlextendedfilearrayhdls;
  116.         textstoredinfile, mfileopen, mfilenew, matrixnew, matrixstoredinfile: hdlbooleanfilearray;
  117.  
  118.         varfile, numfile, nummatrix, dummyfile: text;
  119.         matrix, dummymatrix: hdlsinglearraymatrix;
  120.  
  121.         nodematrix: hdlnodematrixarray;
  122.         storematrix: hdlstorematrixarray;
  123.         varfilename, numfilename: stringsize;
  124.         error: str255;
  125.         varfileopen, numfileopen, dummyopen: boolean;
  126.         blocksize: size;
  127.         ans: extended;
  128.  
  129. implementation
  130.  
  131.     procedure Globals;
  132.  
  133.     begin
  134.  
  135.     end;
  136.  
  137.  
  138. end.